email me at borlaj@portlandschools.org

Loading
notes previous (10/<10) submit the dump links  
 

Pausing a JTextField

 

Unfortunately you cant use sleep in JTextField, you have to use a convulated method below:

 

			textField.setText("happy");
            ActionListener listener = new ActionListener(){
                    public void actionPerformed(ActionEvent event){
                       //put all you want to do after delay in here
                       textField.setText("dog"); 
                    }
                };
            Timer displayTimer = new Timer(2000, listener);
            displayTimer.start();
            displayTimer.setRepeats(false);